﻿/*
* This software is the confidential and proprietary
* information of NetBay
* Such confidential information should not be disclosed
* NetBay copyright(c) 2010
*/
#region Using
using NetBay.Core.Extensions;
using NetBay.Core.DataAccess;
using System.ComponentModel;
using System.Data;

#endregion

namespace Rio.Doc.DataAccess
{
    public class DA_GUI
    {
        #region Enum
        /// <summary>
        /// List of DB functions to access data
        /// </summary>
        public enum DbFunction
        {
            [DescriptionAttribute("")]
            None,
            [DescriptionAttribute("P_INDEX_List_Get_Values")]
            GetIndexValueList,
        }
        #endregion

        /// <summary>
        /// 
        /// </summary>
        /// <param name="p_lUserId"></param>
        /// <returns></returns>
        public static IDataReader GetIndexValueList(long p_lFolderTypeId, string p_sIndexOrder)
        {
            var db = DbHelper.DataBase;

            var dbCommand = db.GetNewCommand(DbFunction.GetIndexValueList.szGetDescription());
            db.AddInParameter(dbCommand, "p_lFolderTypeId", DbType.Int32, p_lFolderTypeId);
            db.AddInParameter(dbCommand, "p_lIndexNumber", DbType.String, p_sIndexOrder);

            return db.ExecuteReader(dbCommand);
        }
    }
}